﻿@using Abp.Application.Services.Dto
@using MyCompanyName.AbpZeroTemplate.MultiTenancy
@using MyCompanyName.AbpZeroTemplate.Web.Areas.Mpa.Models.Common.Modals
@model MyCompanyName.AbpZeroTemplate.Web.Areas.Mpa.Models.Tenants.EditTenantViewModel

@Html.Partial("~/Areas/Mpa/Views/Common/Modals/_ModalHeader.cshtml", new ModalHeaderViewModel(L("EditTenant") + ": " + Model.Tenant.TenancyName))

<div class="modal-body">

    <form name="TenantInformationsForm">

        <input type="hidden" name="Id" value="@Model.Tenant.Id" />
        <input type="hidden" name="TenancyName" value="@Model.Tenant.TenancyName" />

        <div class="form-group form-md-line-input form-md-floating-label">
            <input type="text" name="Name" value="@Model.Tenant.Name" class="form-control edited" required maxlength="@Tenant.MaxNameLength">
            <label>@L("Name")</label>
        </div>

        <div class="form-group form-md-line-input form-md-floating-label no-hint">
            @Html.DropDownList("EditionId", Model.EditionItems.Select(i => i.ToSelectListItem()), new {@class = "form-control edited"})
            <label for="EditionId">@L("Edition")</label>
        </div>

        <div class="md-checkbox-list">
            <div class="md-checkbox">
                <input id="EditTenant_IsActive" class="md-check" type="checkbox" name="IsActive" value="true" @Html.Raw(Model.Tenant.IsActive ? "checked=\"checked\"" : "")>
                <label for="EditTenant_IsActive">
                    <span class="inc"></span>
                    <span class="check"></span>
                    <span class="box"></span>
                    @L("Active")
                </label>
            </div>
        </div>

    </form>

</div>

@Html.Partial("~/Areas/Mpa/Views/Common/Modals/_ModalFooterWithSaveAndCancel.cshtml")